package com.sunny.myproject.buy.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.sunny.myproject.client.entity.Client;
import com.sunny.myproject.storem.entity.Materiel;
import com.sunny.myproject.system.entity.IdEntity;

@Entity
@Table(name="tb_buyPlan_sub")
public class BuyPlan_sub extends IdEntity{

	private Client client;
	private Materiel materiel;
	private BuyPlan buyPlan;
	private double price;
	private double amount;
	/**
	 * 备品
	 */
	private double space_parts_amount;
	private Date date;
	private String remark;
	
	@ManyToOne(targetEntity=Client.class)
	public Client getClient() {
		return client;
	}
	public void setClient(Client client) {
		this.client = client;
	}
	@ManyToOne(targetEntity=Materiel.class)
	public Materiel getMateriel() {
		return materiel;
	}
	public void setMateriel(Materiel materiel) {
		this.materiel = materiel;
	}
	@OneToOne(targetEntity=BuyPlan.class)
	public BuyPlan getBuyPlan() {
		return buyPlan;
	}
	public void setBuyPlan(BuyPlan buyPlan) {
		this.buyPlan = buyPlan;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public double getSpace_parts_amount() {
		return space_parts_amount;
	}
	public void setSpace_parts_amount(double space_parts_amount) {
		this.space_parts_amount = space_parts_amount;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
}
